package com.ruoyi.repair.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.repair.mapper.PropertyInspectionPlanMapper;
import com.ruoyi.repair.domain.PropertyInspectionPlan;
import com.ruoyi.repair.service.IPropertyInspectionPlanService;

/**
 * 巡检计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyInspectionPlanServiceImpl implements IPropertyInspectionPlanService 
{
    @Autowired
    private PropertyInspectionPlanMapper propertyInspectionPlanMapper;

    /**
     * 查询巡检计划
     * 
     * @param planId 巡检计划主键
     * @return 巡检计划
     */
    @Override
    public PropertyInspectionPlan selectPropertyInspectionPlanByPlanId(Long planId)
    {
        return propertyInspectionPlanMapper.selectPropertyInspectionPlanByPlanId(planId);
    }

    /**
     * 查询巡检计划列表
     * 
     * @param propertyInspectionPlan 巡检计划
     * @return 巡检计划
     */
    @Override
    public List<PropertyInspectionPlan> selectPropertyInspectionPlanList(PropertyInspectionPlan propertyInspectionPlan)
    {
        return propertyInspectionPlanMapper.selectPropertyInspectionPlanList(propertyInspectionPlan);
    }

    /**
     * 新增巡检计划
     * 
     * @param propertyInspectionPlan 巡检计划
     * @return 结果
     */
    @Override
    public int insertPropertyInspectionPlan(PropertyInspectionPlan propertyInspectionPlan)
    {
        return propertyInspectionPlanMapper.insertPropertyInspectionPlan(propertyInspectionPlan);
    }

    /**
     * 修改巡检计划
     * 
     * @param propertyInspectionPlan 巡检计划
     * @return 结果
     */
    @Override
    public int updatePropertyInspectionPlan(PropertyInspectionPlan propertyInspectionPlan)
    {
        return propertyInspectionPlanMapper.updatePropertyInspectionPlan(propertyInspectionPlan);
    }

    /**
     * 批量删除巡检计划
     * 
     * @param planIds 需要删除的巡检计划主键
     * @return 结果
     */
    @Override
    public int deletePropertyInspectionPlanByPlanIds(Long[] planIds)
    {
        return propertyInspectionPlanMapper.deletePropertyInspectionPlanByPlanIds(planIds);
    }

    /**
     * 删除巡检计划信息
     * 
     * @param planId 巡检计划主键
     * @return 结果
     */
    @Override
    public int deletePropertyInspectionPlanByPlanId(Long planId)
    {
        return propertyInspectionPlanMapper.deletePropertyInspectionPlanByPlanId(planId);
    }
}
